<?php
$users = $this->users;
?>
<div>
    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th>ID</th>
                <th>Role</th>
                <th>Civilité</th>
                <th>Email</th>
                <th>Date de naissance</th>
                <th>Adresse</th>
                <th>Actions</th>
            </tr>
        <tbody>
            <?php foreach ($users->user as $user) : ?>
                <?php if ("admin" == $user->attributes()->role) : ?>
                    <tr class="info">
                    <?php else : ?>
                    <tr>
                    <?php endif; ?>

                    <td><?php echo $user->attributes()->id ?></td>
                    <td><?php echo $user->attributes()->role ?></td>
                    <td><?php echo $user->nom . " " . $user->prenom ?></td>
                    <td><?php echo $user->email ?></td>
                    <td><?php echo $user->dob ?></td>
                    <td><?php echo $user->adresse . " " . $user->cp . " " . $user->ville ?></td>
                    <td><?php echo "Modifier" ?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

</div>